#pragma once

#include <windows.h>
using namespace System;
using namespace System::Runtime::InteropServices;

inline char* MarshalString(String^ s)
{
	return (char*)Marshal::StringToHGlobalAnsi(s).ToPointer();
}

inline wchar_t* MarshalStringW(String^ s)
{
	return (wchar_t*)Marshal::StringToHGlobalUni(s).ToPointer();
}

inline void FreeUnmanagedString(void* s)
{
	Marshal::FreeHGlobal((IntPtr)s);
}
